package writtenTraining.day3;

import java.io.*;
import java.util.*;

/**
 * day3:(1)模拟：BC149 简写单词
 */
public class Main {
    public static void main(String[] args) {
        // 输入
        Scanner in  = new Scanner(System.in);
        String str = in.nextLine();
        
        StringBuilder ret = new StringBuilder(); 
        // 统计结果
        // 先统计第一个
        char ch1 = str.charAt(0);
        ret.append((char)(ch1 >= 'a' && ch1 <= 'z' ? ch1 - 32 : ch1));

        for(int i = 1; i < str.length(); i++) {
            
            if(str.charAt(i) == ' ') {
                ch1 = str.charAt(i+1);
                ret.append((char)(ch1 >= 'a' && ch1 <= 'z' ? ch1 - 32 : ch1));
            }
        }

        // 输出
        System.out.println(ret.toString());
    }
}

/**
 * day3:(2)滑动窗口:dd爱框框
 */



 class Main1 {
    public static PrintWriter out  = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    private static Read in  = new Read();
    public static void main(String[] args) throws IOException {

        // 输入
        int len = in.nextInt(),target = in.nextInt();
        int[] nums = new int[len+1];
        for(int i = 1; i <= len; i++) {
            nums[i] = in.nextInt();
        }


//         连续区间滑动窗口
        int left = 1, right = 1,begin = -1 , end = -1, minLen = len;
        int sum = 0;
        while(right <= len) {
            // 入窗口
            sum += nums[right];

            while(sum >= target) {
//                 更新结果
                if(right - left + 1 < minLen) {
                    begin = left ;
                    minLen = right - left + 1;
                    end = right;
                }

//                 出窗口
                sum -= nums[left];
                left++;
            }
            right++;
        }

        // 输出
        System.out.println(begin + " " + end);

    }

}

/**
 * 快速读入
 */

class Read {
    StringTokenizer st = new StringTokenizer("");
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String next() throws IOException {
        while(!st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }

    String nextLine() throws IOException {
        return br.readLine();
    }
    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
    long nextLong() throws IOException {
        return Long.parseLong(next());
    }
    double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }
}

/**
 * day3:（3）模拟+大根堆：除2！
 */

 class Main2 {
    public static void main(String[] args) throws IOException{
        // 大根堆思想
        Read in = new Read();
        // 输入
        int len = in.nextInt(), k = in.nextInt();
        PriorityQueue<Integer> queue = new PriorityQueue<>((a,b)->(b-a));
        long sum = 0;
        for(int i = 0; i < len; i++) {
            long num = in.nextLong();
            sum += num;
//             是偶数就加入队列
            if(num % 2 == 0) {
                queue.add((int)num);
            }
        }

        // 开始操作k次
        for(int i = 0; i < k && !queue.isEmpty();i++) {
            long num = queue.poll();
            num /= 2;
            sum -= num;
            // 判断是否是偶数，偶数才加入队列
            if(num % 2 == 0) {
                queue.add((int)num);
            }
        }

        // 输出结果
        System.out.println(sum);
    }
}

/**
 * day3:（3）模拟+大根堆：除2！（简化版）
 */

 class Main3 {
    public static void main(String[] args) throws IOException{
        // 大根堆思想

        Scanner in = new Scanner(System.in);
        // 输入
        int len = in.nextInt(), k = in.nextInt();
        PriorityQueue<Long> queue = new PriorityQueue<>((a,b)->(b.compareTo(a)));
        long sum = 0;
        for(int i = 0; i < len; i++) {
            long num = in.nextLong();
            sum += num;
//             是偶数就加入队列
            if(num % 2 == 0) {
                queue.add(num);
            }
        }

        // 开始操作k次
        for(int i = 0; i < k && !queue.isEmpty();i++) {
            long num = queue.poll();
            num /= 2;
            sum -= num;
            // 判断是否是偶数，偶数才加入队列
            if(num % 2 == 0) {
                queue.add(num);
            }
        }

        // 输出结果
        System.out.println(sum);
    }
}




